<template>
   <Meta name="baidu-site-verification" content="codeva-PGMMTu0XcE" />
   <Meta name="msvalidate.01" content="9A74E939E70A79126CB49911830CB762" />
   <div class="YZS-APP" ref="YZS" :style="{ backgroundImage: `url(${cnyzs.COMMON_BACKGROUNDCOLOR})` }">
      <div class="AOIR-MASK-LAYER" :style="{ backgroundColor: cnyzs.COMMON_MASK_LAYER }">
         <CommonLogin v-if="openLogin === true" />
         <CommonTopUpMoney v-if="openMoney === true" />
         <NuxtLayout>
            <NuxtPage />
         </NuxtLayout>
      </div>
   </div>
</template> 
<script lang="ts" setup >
import { storeToRefs } from 'pinia';
const { cnyzs, openLogin, openMoney } = storeToRefs(cnyzsCommonpinia())
await Promise.all([cnyzsCommonpinia().getConfig(), cnyzsUserpinia().getUserinfo()])
const aliicon = await fetch(cnyzs.value.COMMON_ICON).then(res => res.text())
useHead({
   style: [aliicon]
})
onMounted(() => {
   document.body.style.setProperty('--aoir-color-primary', cnyzs.value.COMMON_THEMECOLOR);
   document.body.style.setProperty('--el-color-primary', cnyzs.value.COMMON_THEMECOLOR);
   document.body.style.setProperty('--aoir-color-vip', cnyzs.value.COMMON_VIP_COLOR);
   const timeout = setTimeout(async () => {
      cnyzsUserpinia().getUserNotificationNumber()
   }, 1000);
   onUnmounted(() => {
      clearTimeout(timeout)
   })
})


</script>
<style lang="scss" scoped>
.YZS-APP {
   background-attachment: fixed;
   background-position: top center;
   background-size: cover;
   background-repeat: no-repeat;
   transform: none;
}

.AOIR-MASK-LAYER {
   width: 100%;
   height: 100%;
   background-color: rgba(255, 255, 255, 0.903);
}
</style>